//
//  AppOpenUrlManager.swift
//  XiaoweHearingAid
//
//  Created by edy on 2024/1/3.
//

import Foundation

//        DispatchQueue.main.asyncAfter(deadline: .now() + 4) {
//            if let tUrl = URL(string: "weixin://biz/ww/profile/https%3A%2F%2Fwork.weixin.qq.com%2Fca%2Fcawcde853429d8f9db%3Fcustomer_channel%3DWORK") {
//                UIApplication.shared.open(tUrl)
//            }
//        }


class AppOpenUrlManager {
    
//    class func gotoWeixin() -> Bool {
//        let urlPath = "weixin://biz/ww/profile/https%3A%2F%2Fwork.weixin.qq.com%2Fca%2Fcawcde853429d8f9db%3Fcustomer_channel%3DWORK"
//        guard let url = URL(string: urlPath) else {
//            log.error("跳转微信失败 url 为空 \n")
//
//            return false
//        }
//        
//        let isOk = UIApplication.shared.canOpenURL(url)
//        
//        if !isOk {
//            log.error("跳转微信失败 url = \(url) \n")
//
//            return false
//        }
//        
//        UIApplication.shared.open(url)
//        
//        return true
//    }
    
    class func gotoWeixin() -> Bool {
        return gotoWeixinByUM()
    }
    
    class func gotoWeixinByUM() -> Bool {
        return AppUMManager.gotoWeixin()
    }
    
}
